package com.hjh.thymeleafdemo1.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("user")
public class User implements Serializable {
    @TableId(type = IdType.AUTO)
    @TableField("id")
    private Long id;
    @TableField("name")
    private String name;
    @TableField("password")
    private String password;
    @TableField("email")
    private String email;
    @TableField("gender")
    private int gender;
    @TableField(exist = false)
    private Dept dept;
    @TableField("deptid")
    private int deptid;
    @TableField("birth")
    private Date birth;
    public User(){}

    public User(Long id, String name, String password, String email, int gender, Dept dept, int deptid, Date birth) {
        this.id = id;
        this.name = name;
        this.password = password;
        this.email = email;
        this.gender = gender;
        this.dept = dept;
        this.deptid = deptid;
        this.birth = birth;
    }
}
